package com.luojiaoj.subject

import com.luojiaoj.User

/**
 * Created with IntelliJ IDEA.
 * User: acer
 * Date: 13-1-24
 * Time: 上午11:08
 * To change this template use File | Settings | File Templates.
 */
class Subject {
    String title

    String content

    String sampleTest

    String source

    User author

    Category category

    Set<Tag> tags = new HashSet<Tag>()

    static belongsTo = [category: Category]

    static hasMany = [tags: Tag]

    static constraints = {
        title size: 0..32
        content size: 0..65535
        tags nullable: true
        sampleTest nullable: true
        source nullable: true
        author nullable: true
    }
}
